#!/bin/bash
# Copyright (c) 2017 ~ 2025, the original author wangl.sir individual Inc,
# All rights reserved. Contact us wanglsir<wangl@gmail.com, 983708408@qq.com>
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# @see https://yq.aliyun.com/articles/741365
# @see https://www.jianshu.com/p/f6437e914584
# @see https://blogs.wl4g.com:443/archives/60

[Unit]
Description=Redis Cluster Server
After=network.target

[Install]
WantedBy=multi-user.target

[Service]
Type=forking
User=wanglsir
Group=wanglsir
ExecStart=/usr/bin/redisctl start --aof-fix
ExecReload=/bin/kill -s HUP 
StandardOutput=journal
StandardError=journal
# Cannot set too large to exceed the maximum system limit, otherwise an error will be reported: 'Failed at
# step LIMITS spawning: Operation not permitted'. e.g: /etc/security/limits.conf
LimitNOFILE=65535
LimitNPROC=65535
LimitCORE=infinity
TimeoutStartSec=5
TimeoutSec=600
Restart=always
PermissionsStartOnly=true
RuntimeDirectoryMode=755
PrivateTmp=false

